package com.zaoqi.service.impl;

import com.zaoqi.mapper.HistoryRecordMapper;
import com.zaoqi.pojo.HistoryRecord;
import com.zaoqi.service.HistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.sql.Date;
import java.util.List;

@Service
@Transactional
public class HistoryServiceImpl implements HistoryService{
    @Autowired
    private HistoryRecordMapper historyRecordMapper;
    @Override
    public List<HistoryRecord> getHistoryRecords(String operator, java.util.Date operateDate) {
        java.sql.Date sqlDate = null;
        if (operateDate != null) {
            sqlDate = new java.sql.Date(operateDate.getTime());
        }
        return historyRecordMapper.findHistoryRecords(operator, sqlDate);
    }

}
